#! /usr/bin/env python
# encoding: utf-8

def build(ctx):
    files = ' '
    use = 'default '

    if ctx.env.USING_ELF:
        files += 'SymtabElf.cpp TypeDb.cpp TranscoderPluginDb.cpp '
        use += 'elf '

    source = ctx.path.ant_glob(files)
    if len(source) != 0:
        ctx.stlib(target = 'zcm_tools_util',
                  export_includes = "../",
                  use = use,
                  source = source)
    else:
        ctx(name = 'zcm_tools_util',
             use = use)
